package cn.wolfcode.rbac.domain;
import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

@Data @AllArgsConstructor @NoArgsConstructor
public class CustomerTransfer extends BaseDomain{
    private Long customerId;
    private Long operatorId;
    private String operateTime;
    private Long oldSellerId;
    private Long newSellerId;
    private String reason;
    private String newSellerName;
    private Long sellerId;

    private Employee oldSeller;
    private Employee newSeller;
    private Customer customer;

    public String getJson(){
        Map map = new HashMap();
        map.put("id",id);
        map.put("customerId",customerId);
        map.put("operatorId",operatorId);
        map.put("operateTime",operateTime);
        map.put("oldSellerId",oldSellerId);
        map.put("newSellerId",newSellerId);
        map.put("reason",reason);
        map.put("newSellerName",newSellerName);
        map.put("oldSeller",oldSeller);
        map.put("newSeller",newSeller);
        map.put("customer",customer);
        map.put("sellerId",sellerId);
        return JSON.toJSONString(map);
    }
}
